Resistance to frequency circuit for measuring ambient temperature on a thermostat

ABSTRACT

A resistance to frequency circuit for measuring the ambient temperature on a thermostat. The temperature measuring circuit comprises a first Schmitt trigger NAND gate, a rectifier, a capacitor of which one terminal is electrically connected to ground, a first resistor, a thermistor and possibly a second resistor. The capacitor is connected with the cathode electrically connected to ground, the anode is electrically connected to the first input of a NAND gate. The output of the NAND gate is electrically connected to the anode of the rectifier. The cathode of the rectifier is electrically connected to both the thermistor and the first resistor. The second terminal of the first resistor is electrically connected to the anode of the capacitor and the first input to the NAND gate. The thermistor is electrically connected to a tri-state buffer of the microprocessor. The circuit uses the open drain output ports of a microprocessor to provide the multiplexer function of the A/D. Two precision resistors are connected to the cathode of the rectifier with their second terminals electrically connected to a second and third tri-state buffer. By selectively switching through the tri-state buffers, and measuring the resulting frequencies, errors in the system can be calculated and thereby eliminated from the measured temperature of the system.

BACKGROUND

The present invention relates broadly to resistance to frequencyconverters for temperature measurement. More specifically, the inventionrelates to a resistance to frequency converter for temperaturemeasurement utilizing active calibration.

Electronics thermostats are extremely common in the current marketplace.The majority of those thermostats utilize a resistance to frequencyconversion to calculate the temperature. For example, see Levine U.S.Pat. No. 4,314,665. Resistance to frequency converters are generallyvery accurate, can update the thermostat with the current ambienttemperature quickly and require a low parts count.

In the majority of accurate resistance to frequency A/D convertersutilize a comparator in the oscillator circuit to increase the accuracyof the overall system. To provide a comparator for the system requiresan additional piece part at an added cost to the overall system. Intoday's highly competitive market additional piece parts cansignificantly reduce margins. An additional comparator can add up tothirty cents a device. In today's world that is a very significantexpense.

This invention provides a low cost method of accurately measuring thetemperature. It provides a means for active calibration which allows theuse of low cost components without sacrificing temperature accuracy.

SUMMARY OF THE INVENTION

This invention is a resistance to frequency circuit for measuring theambient temperature on a thermostat. The temperature measuring circuitcomprises a first Schmitt trigger NAND gate, a rectifier, a capacitor ofwhich one terminal is electrically connected to ground, a firstresistor, a thermistor and possibly a second resistor. The capacitor isconnected with the cathode electrically connected to ground, the anodeis electrically connected to the first input of a NAND gate. The outputof the NAND gate is electrically connected to the anode of therectifier. The cathode of the rectifier is electrically connected toboth the thermistor and the first resistor. The second terminal of thefirst resistor is electrically connected to the anode of the capacitorand the first input to the NAND gate. The thermistor is electricallyconnected to a tri-state buffer of the microprocessor.

A control signal is provided to the second input to the NAND gate. Whenthe control signal is high, the output of the NAND gate goes high andcharges the capacitor through the rectifier and the first resistor. Whenthe capacitor sufficiently charges beyond the threshold of theSchmitt-trigger NAND gate, the output of the NAND gate goes low and thecapacitor drains through the thermistor until the capacitor dischargessufficiently to toggle the NAND gate high. In this manner, thetemperature detection circuit oscillates with a frequency which isdependent upon the resistance of the thermistor. The output of the NANDgate is provided to a second Schmitt-trigger device. Which is thenprovided to the microprocessor.

Two precision resistors are connected to the cathode of the rectifierwith their second terminals electrically connected to a second and thirdtri-state buffer. By selectively switching through the tri-statebuffers, and measuring the resulting frequencies, errors in the systemcan be calculated and thereby eliminated from the measured temperatureof the system.

The circuit uses the open drain output ports of a microprocessor toprovide the multiplexer function of the A/D. Many microprocessor provideopen drain outputs which can be used for this function.

By using two channel calibration there is an increase in the accuracy ofthe system allowing for the use of a NAND gate in place of a comparator.Further the NAND gate is essentially costs nothing because multiple NANDgates are placed on a chip and they are used elsewhere in the device.This is a cost savings of significant proportions, by eliminating thecomparator.

BRIEF DESCRIPTION OF THE DRAWING

FIG. 1 is the schematic diagram of a first embodiment of preferredembodiment of the invention.

FIG. 2 is the schematic diagram of a second embodiment of preferredembodiment of the invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

The preferred embodiment of FIG. 1 comprises a microprocessor 20 with aplurality of tri-state inputs, an input node and an output node.Microprocessor 20, for the preferred embodiment, has a first tri-stateinput node A, a second tri-state input node B, and a third tri-stateinputnode C. For the preferred embodiment microprocessor 20 is a SanyoLC5868H micro-controller. Control node D provides a enabling pulse toNAND gate 14. Input node E is provided with the output from inverter 16.The resistance to frequency A/D circuit comprises NAND gate 14, inverter16, rectifier 18, thermistor 4, resistors 2, 6, 8 and 10, and capacitor12. NAND gate 14 is a "Schmitt trigger" NAND gate. Resistors 6 and 8 arethe calibration resistors and are precision resistors.

Capacitor 12 has an anode and a cathode. The cathode is electricallyconnected to ground and the anode is electrically connected to the firstinput of NAND 14 and the first terminal of resistor 10. The input node Dfrom microprocessor 20 is electrically connected to the second input ofNAND gate 14. The output of NAND gate 14 is provided to inverter 16 andthe anode of rectifier 18. The cathode of rectifier 18 is electricallyconnected to the second terminal of resistor 10, the first terminal ofthermistor 4, the first terminal of resistor 6, and the first terminalof resistor 8. The second terminal of thermistor 4 is electricallyconnected to the first terminal of resistor 2. The second terminal ofresistor 2 is electrically connected to input node A of microprocessor20. The second terminal of resistor 6 is electrically connected to theinput terminal B of microprocessor 20. The second terminal of resistor 8is electrically connected to input node C of microprocessor 20. Inputnodes A, B and C of microprocessor 20 are tri-state nodes and for thepreferred embodiment areeither set in a high-impedance mode or are setto ground. In this manner, microprocessor 20 can select which resistor,the combination of thermistor4 and resistor 2, or resistor 6 or resistor8 controls the oscillation frequency of the circuit. By setting theinput node as a high-impedance effectively eliminates that resistor fromthe circuit.

For the temperature detection portion of operation, the circuit operatesbymicroprocessor 20 setting nodes B and C to a high impedance and node Ato ground. A high signal from control node D to NAND gate 14 sets theoutput of NAND gate 14 low which causes capacitor 12 to dischargethrough the series combination of resistor 10, thermistor 4 and resistor2. When the capacitor has discharged below the low level thresholdtrigger point of NAND gate 14 the output of NAND gate 14 goes highcharging capacitor 12 until the voltage across capacitor 12 increasesbeyond the high level thresh hold trigger point of NAND gate 14. Thiswill then set the output of NAND gate 14 low. In this manner the circuitwill oscillate dependent upon the resistance of thermistor 4. A squarewave at this frequency is provided to Input node E of microprocessor 20.Microprocessor 20 then calculates the frequency of the signal (F1) andutilizes this frequency todetermine the ambient temperature.

To calibrate the circuit the steps for determining the ambienttemperature are followed however, node A of microprocessor 20 is set ata high impedance. Node B is then set at ground while node C stays at ahigh impedance. The frequency is provided to input node E.Microprocessor 20 then calculates this frequency (F2). The second phaseof the calibration is the same as the first, however nodes A and B arenow set at a high impedance and node C is set to ground. Themicroprocessor then determines the third frequency (F3).

To calculate the actual ambient temperature of the device microprocessor20utilizes the formula:

    temperature= (F1-F2)/(F3-F2)!*(m+b)

Note that m is the slope and b is the intercept resulting from a linearcurve fit. The linear curve fit is achieved by varying the temperatureof the device and measuring F1, F2, and F3. The above formula is thenused tocalculate device temperature. The calculated device temperatureis then compared to the actual device temperature. If the calculateddevice temperature does not provide the accuracy required of the devicethen slope m and intercept b can be adjusted until the desired accuracyis achieved. The curve fit accuracy check is performed while varying allcomponent tolerances to their extremes with a given slope and intercept.This verifies that the A/D will meet the device accuracy requirements.

By using two channel calibration the accuracy of the system is increasedallowing the use of any Schmitt trigger gate. These gates are generallyfree as a number of these gates are present on a chip. These gates aregenerally required for other functions and therefore the extra gate canbeused for this purpose.

FIG. 2 is the schematic diagram of a second embodiment of the invention.The circuit illustrated in FIG. 2 is similar to that of FIG. 1 with theexception that inverter 16 is eliminated and NAND gate 14 is replaced bySchmitt trigger inverter 25. The output of inverter 25 is provided toinput node E directly. Further, the control signal is no longersupplied. The circuit will oscillate continuously and microprocessor 20can sample the output of inverter 25. To stop the oscillation of thecircuit nodes A,B, and C, can all be set at high impedance preventingthe discharge of capacitor 12.

I claim:
 1. A resistance to frequency converter for determining aresistance value of a resistance means, said resistance to frequencyconverter having active calibration, said resistance to frequencyconverter comprising:a microprocessor having a first tri-state buffer, asecond tri-state buffer, a third tri-state buffer, an output node and aninput node, said first tri-state buffer, said second tri-state buffer,and said third tri-state buffer having a high state, a low state, and ahigh impedance state; resistance means having a first node and a secondnode, said second node of said resistance means electrically connectedto said first tri-state buffer wherein said resistance means comprises athermistor; a NAND gate with hysteresis, having a first input, a secondinput and an output, said second input of said nand gate electricallyconnected to said input node of said microprocessor, said input node ofsaid microprocessor providing an on/off signal to said nand gate; aninverter, having an input and an output, said output of said inverterproviding said output frequency to said microprocessor input node, saidinput of said inverter connected to the output node of said NAND gate; acapacitor with an anode and a cathode, said anode of said capacitorelectrically connected to ground, said cathode of said capacitorelectrically connected to said input of said nand gate; a rectifierhaving an anode and a cathode, said anode of said rectifier electricallyconnected to said output of said nand gate, said cathode of saidrectifier electrically connected to said first node of said resistancemeans; a first resistor having a first node and a second node, saidfirst node of said first resistor electrically connected to said inputof said nand gate, said second node of said first resistor electricallyconnected to said cathode of said rectifier; a first precision resistorhaving a first node and a second node, said first node of said firstprecision resistor electrically connected to said cathode of saidrectifier, said second node of said first precision resistorelectrically connected to a second tri-state buffer; and a secondprecision resistor having a first node and a second node, said firstnode of said second precision resistor electrically connected to saidcathode of said rectifier, said second node of said precision resistorelectrically connected to a third tri-state buffer.
 2. A resistance tofrequency converter for determining a resistance value of a resistancemeans, said resistance to frequency converter generating an outputfrequency, said resistance value being proportionate to said outputfrequency, said resistance to frequency converter comprising:resistancemeans having a first node and a second node, said second node of saidresistance means electrically connected to a first tri-state bufferwherein said resistance means comprises a thermistor; an invertor withhystersis, having an input and an output, said output outputting saidoutput frequency; a capacitor with an anode and a cathode, said anode ofsaid capacitor electrically connected to ground, said cathode of saidcapacitor electrically connected to said input of said inverter; arectifier having an anode and a cathode, said anode of said rectifierelectrically connected to said output of said inverter said cathode ofsaid rectifier electrically connected to said first node of saidresistance means; a first resistor having a first node and a secondnode, said first node of said first resistor electrically connected tosaid input of said inverter, said second node of said first resistorelectrically connected to said cathode of said rectifier; a firstprecision resistor having a first node and a second node, said firstnode of said first precision resistor electrically connected to saidcathode of said rectifier, said second node of said first precisionresistor electrically connected to a second tri-state buffer; and asecond precision resistor having a first node and a second node, saidfirst node of said second precision resistor electrically connected tosaid cathode of said rectifier, said second node of said precisionresistor electrically connected to a third tri-state buffer.
 3. Theresistance to frequency converter of claim 1 wherein said resistancemeans further comprises a second resistor in series with saidthermistor.
 4. The resistance to frequency converter of claim 2 whereinsaid resistance means further comprises a second resistor in series withsaid thermistor.